﻿using System.Collections.Generic;
using System.Windows.Forms;
using finProj.Entities;

namespace finProj
{
    public partial class ImagePreview : Form
    {
        public ImagePreview()
        {
            InitializeComponent();
        }

        public ImagePreview(Picture pic)
        {
            InitializeComponent();
            pictureBox1.Image = pic.origPicture.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
            pictureBox2.Image = pic.detectedFacePic.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
            pictureBox3.Image = pic.cannyDetected.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
            label1.Text = pic.FeaturesVec.getFeatureVec();



        }


        public void addImages(List<Picture> list)
        { 
            if (list.Count ==2)
            {
                pictureBox1.Image = list[0].detectedFacePic.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                pictureBox2.Image = list[0].cannyDetected.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                label1.Text = list[0].FeaturesVec.getFeatureVec();
                //pictureBox5.Image = list[0].picture.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                pictureBox3.Image = list[1].detectedFacePic.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                //pictureBox4.Image = list[1].cannyDetected.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                //pictureBox6.Image = list[1].picture.Resize(200, 200, Emgu.CV.CvEnum.INTER.CV_INTER_LINEAR).ToBitmap();
                label2.Text = list[1].FeaturesVec.getFeatureVec();
            }
          
           
        }

        private void ImagePreview_Load(object sender, System.EventArgs e)
        {

        }



    }
}
